﻿<phone:PhoneApplicationPage 
    x:Class="OnlineVideos.Views.CricketDetails"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
     xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False" Loaded="PhoneApplicationPage_Loaded">
    <phone:PhoneApplicationPage.Resources>
        <Style x:Key="ListBoxItemStyle1" TargetType="ListBoxItem">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="BorderBrush" Value="Transparent"/>
            <Setter Property="Padding" Value="0"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBoxItem">
                        <Border x:Name="LayoutRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TransparentBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentContainer"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition From="Selected" GeneratedDuration="0" To="Unselected">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TransparentBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                        <VisualTransition From="Unselected" GeneratedDuration="0" To="Selected">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                        <VisualTransition From="Selected" GeneratedDuration="0" To="SelectedUnfocused">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                        <VisualTransition From="Unselected" GeneratedDuration="0" To="SelectedUnfocused">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                        <VisualTransition From="SelectedUnfocused" GeneratedDuration="0" To="Unselected">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TransparentBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                        <VisualTransition From="SelectedUnfocused" GeneratedDuration="0" To="Selected">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="Unselected"/>
                                    <VisualState x:Name="Selected"/>
                                    <VisualState x:Name="SelectedUnfocused"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition From="Focused" GeneratedDuration="0" To="Unfocused"/>
                                        <VisualTransition From="Unfocused" GeneratedDuration="0" To="Focused"/>
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="Unfocused"/>
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{StaticResource PhoneAccentBrush}" 
										/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </phone:PhoneApplicationPage.Resources>
        
            <!--LayoutRoot is the root grid where all page content is placed-->
            <Grid x:Name="LayoutRoot" Background="Transparent">
                <!--Pivot Control-->
        <controls:Pivot x:Name="pvtMainDetails" Background="{StaticResource bipivot}" >
            <controls:Pivot.Title>
                <StackPanel Orientation="Horizontal" Margin="-20,0,0,0">
                    <Image x:Name="imgTitle" Style="{StaticResource PivotTitle}" Width="71" Height="71" HorizontalAlignment="Left" MouseEnter="imgTitle_MouseEnter"/>
                   
                    <TextBlock x:Name="tblkVideosTitle"   Style="{StaticResource tblkVideosTitle}"/>
                </StackPanel>
            </controls:Pivot.Title>
            <controls:Pivot.Foreground>
                white
            </controls:Pivot.Foreground>
            <controls:PivotItem x:Name="pvtitmCriketSumarry" >
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="520"/>
                        <RowDefinition Height="80"/>
                    </Grid.RowDefinitions>
                    <ScrollViewer Grid.Row="0">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="240" />
                                <ColumnDefinition Width="220" />
                            </Grid.ColumnDefinitions>
                            <StackPanel Grid.Row="0" Grid.ColumnSpan="2" Orientation="Vertical" Margin="0,0,0,10">
                                <TextBlock x:Name="tblkMatchResult" FontSize="30" Foreground="AntiqueWhite"/>

                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Grid.Row="1" Width="454" Grid.ColumnSpan="2" HorizontalAlignment="Left" Margin="0,0,0,20">
                                <TextBlock x:Name="tblkAinningssumary"   FontFamily="Comic Sans MS" Foreground="AntiqueWhite" FontSize="26" Width="230"/>
                                <TextBlock x:Name="txtTeamAtotal" Text="Total:" Margin="20,5,5,0" Foreground="AntiqueWhite" FontSize="24" Visibility="Collapsed"></TextBlock>
                                <TextBlock x:Name="tblkATotsumary"  Width="270"  Margin="2,5,0,0" Foreground="AntiqueWhite" FontSize="24" TextWrapping="Wrap"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="0" Margin="0,10,0,0">
                                <ListBox x:Name="lbxteamAsummary"  Margin="0,0,0,0" ScrollViewer.VerticalScrollBarVisibility="Disabled" Foreground="White">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Grid Height="75">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="150"/>
                                                    <ColumnDefinition Width="90"/>
                                                </Grid.ColumnDefinitions>
                                                <TextBlock Grid.Column="0" x:Name="txtblk" Text="{Binding taBatName}" FontSize="24" TextWrapping="Wrap" Margin="0,0,0,0"/>
                                                <TextBlock Grid.Column="1" x:Name="txtblk2" Text="{Binding taRuns}" FontSize="24" Margin="10,0,0,0"/>
                                            </Grid>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Grid.Row="2" Margin="0,0,0,0" Grid.Column="1">
                                <ListBox x:Name="lbxteamsummaryBbowling" Grid.Row="6" Margin="0,10,0,0" ScrollViewer.VerticalScrollBarVisibility="Disabled" Foreground="White">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Grid Height="75">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="150"/>
                                                    <ColumnDefinition Width="70"/>
                                                </Grid.ColumnDefinitions>
                                                <TextBlock Grid.Column="0" Text="{Binding tbBowlname}" FontSize="24" TextWrapping="Wrap"/>
                                                <TextBlock Grid.Column="1" Text="{Binding tbWickets}" FontSize="24"/>
                                                <TextBlock Grid.Column="1"  Text="/" FontSize="24" Margin="14,0,0,0"/>
                                                <TextBlock Grid.Column="1" x:Name="txtblk3" Text="{Binding tbBowlRuns}" FontSize="24" Margin="24,0,0,0"/>
                                            </Grid>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Width="454" Grid.ColumnSpan="2"  HorizontalAlignment="Left" Grid.Row="3" Margin="0,20,0,20">
                                <TextBlock x:Name="tblkBsummaryinnings"  Margin="0,0,0,0" FontFamily="Comic Sans MS" Foreground="AntiqueWhite" FontSize="26" Width="230"/>
                                <TextBlock x:Name="txtTeamBtotal" Text="Total:" Margin="20,5,5,0" Foreground="AntiqueWhite" FontSize="24" Visibility="Collapsed" ></TextBlock>
                                <TextBlock x:Name="tblkBTotsumary"  Width="270"  Margin="2,5,0,0" Foreground="AntiqueWhite" FontSize="24" TextWrapping="Wrap"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Grid.Row="4" Grid.Column="0" Margin="0,10,0,0">
                                <ListBox x:Name="lbxteamBsummary"  Margin="0,0,0,0" ScrollViewer.VerticalScrollBarVisibility="Disabled" Foreground="White">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Grid Height="75">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="150"/>
                                                    <ColumnDefinition Width="100"/>
                                                </Grid.ColumnDefinitions>
                                                <TextBlock Grid.Column="0" x:Name="txtblk" Text="{Binding tbBatName}" FontSize="24" TextWrapping="Wrap"/>
                                                <TextBlock Grid.Column="1" x:Name="txtblk2" Text="{Binding tbRuns}" FontSize="24" Margin="20,0,0,0"/>
                                            </Grid>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Grid.Row="4" Margin="0,10,0,0" Grid.Column="1">
                                <ListBox x:Name="lbxteamAsummarybowling" Grid.Row="13" Margin="0,0,0,0" ScrollViewer.VerticalScrollBarVisibility="Disabled" Foreground="White">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Grid Height="75">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="150"/>
                                                    <ColumnDefinition Width="70"/>
                                                </Grid.ColumnDefinitions>
                                                <TextBlock Grid.Column="0" Text="{Binding taBowlname}" FontSize="24" TextWrapping="Wrap"/>
                                                <TextBlock Grid.Column="1" Text="{Binding taWickets}" FontSize="24"/>
                                                <TextBlock Grid.Column="1"  Text="/" FontSize="24" Margin="14,0,0,0"/>
                                                <TextBlock Grid.Column="1" x:Name="txtblk3" Text="{Binding taBowlRuns}" FontSize="24" Margin="24,0,0,0"/>
                                            </Grid>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>

                        </Grid>
                    </ScrollViewer>
                    <Canvas>
                        <Button Grid.Row="1" x:Name="btnMatchResult" Canvas.Top="520" Canvas.Left="100" Foreground="White"  Click="btnMatchResult_Click" Content="Fullscorecard" BorderBrush="White" Visibility="Collapsed" ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
                    </Canvas>
                </Grid>
            </controls:PivotItem>
            <!--Pivot item one-->
            <controls:PivotItem x:Name="pvtitmSongs">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="80"/>
                    </Grid.RowDefinitions>
                    <ListBox x:Name="lbxSongsList" Margin="0,-30,0,8" Grid.Row="0" Foreground="White" SelectionChanged="lbxSongsList_SelectionChanged"  VerticalAlignment="Top" Loaded="lbxSongList_Loaded">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <toolkit:ContextMenuService.ContextMenu>
                                        <toolkit:ContextMenu>
                                            <toolkit:MenuItem  Header="{Binding pin}" Click="btnpintostart_Click">
                                            </toolkit:MenuItem>
                                            <toolkit:MenuItem Header="add to favorites" Click="btnFavSong_Click"/>
                                            <toolkit:MenuItem Header="report broken link" Click="btnBrokenSong_Click">
                                            </toolkit:MenuItem>
                                            <toolkit:MenuItem Header="{Binding Ratetitle}" Click="ratelink_Click">
                                            </toolkit:MenuItem>
                                            <toolkit:MenuItem Header="share with friends" Click="sharelink_Click">
                                            </toolkit:MenuItem>
                                        </toolkit:ContextMenu>
                                    </toolkit:ContextMenuService.ContextMenu>
                                    <Image Source="/Images/ArrowImg.png" Height="43" Width="43" VerticalAlignment="Center" Margin="10,33,20,0"/>
                                    <TextBlock Text="{Binding ChapterNo}" Margin="-2,30,0,0"  Width="380" FontSize="28" VerticalAlignment="Center" TextWrapping="Wrap"/>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    <StackPanel Name="adstackpl" Grid.Row="1" Orientation="Vertical"  Margin="-4,0,0,0">
                    </StackPanel>
                    <Canvas>
                        <TextBlock Canvas.Top="200" Canvas.Left="80" FontSize="28" x:Name="tblkFavNoSongs" Text="Videos Not Available" Visibility="Collapsed"/>
                    </Canvas>
                </Grid>
            </controls:PivotItem>
            <!--Pivot item two-->
            <controls:PivotItem>
                <controls:PivotItem.Header>
                    <TextBlock x:Name="tblkCriketCastTeam1" Margin="0,17,0,0" FontSize="58"></TextBlock>
                </controls:PivotItem.Header>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="80"/>
                    </Grid.RowDefinitions>
                    <ListBox x:Name="lbxcriketCastTeam1" Grid.Row="0" SelectionChanged="lbxcriketCastTeam1_SelectionChanged" Foreground="White" Margin="0,0,0,15">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid Height="150">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="120"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <Image Grid.Column="0" Grid.Row="0" x:Name="imgMovie" Source="{Binding PsnImage}" VerticalAlignment="Top" Width="100" Height="170" />
                                    <StackPanel Grid.Row="0" Grid.Column="1" Margin="24,-12,0,0" Orientation="Vertical" VerticalAlignment="Top">
                                        <TextBlock Text="{Binding Personname}"  FontSize="35" Margin="0,0,0,10" TextWrapping="Wrap"></TextBlock>
                                        <TextBlock Text="{Binding PersonRole}" FontSize="22"></TextBlock>
                                    </StackPanel>
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    <StackPanel Name="adstacriketCastTeam1" Grid.Row="1" Orientation="Vertical"  Margin="-4,0,0,0">
                    </StackPanel>
                </Grid>
            </controls:PivotItem>

            <!--Pivot item three-->
            <controls:PivotItem>
                <controls:PivotItem.Header>
                    <TextBlock x:Name="tblkitmCriketCastTeam2" Margin="0,17,0,0" FontSize="60"></TextBlock>
                </controls:PivotItem.Header>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="80"/>
                    </Grid.RowDefinitions>
                    <ListBox x:Name="lbxcriketCastTeam2" Grid.Row="0" SelectionChanged="lbxcriketCastTeam2_SelectionChanged" Foreground="White"  Margin="0,0,0,15">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid Height="150">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="120"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <Image Grid.Column="0" Grid.Row="0" x:Name="imgMovie" Source="{Binding PsnImage}" VerticalAlignment="Top" Width="100" Height="170" />
                                    <StackPanel Grid.Row="0" Grid.Column="1" Margin="24,-12,0,0" Orientation="Vertical" VerticalAlignment="Top">
                                        <TextBlock Text="{Binding Personname}"  FontSize="35" Margin="0,0,0,10" TextWrapping="Wrap"></TextBlock>
                                        <TextBlock Text="{Binding PersonRole}" FontSize="22"></TextBlock>
                                    </StackPanel>
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    <StackPanel Name="adstacriketCastTeam2" Grid.Row="1" Orientation="Vertical"  Margin="-4,0,0,0">
                    </StackPanel>
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>

        <toolkit:PerformanceProgressBar
            VerticalAlignment="Center" Foreground="White"
            x:Name="performanceProgressBar" />
    </Grid>
       
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>